from django.db import models

# Create your models here.


class User(models.Model):
    username=models.CharField(max_length=32)
    password=models.CharField(max_length=128)
    phone=models.CharField(max_length=11)
    img=models.ImageField(upload_to='img')

    class Meta:
        db_table='user'



class Users(models.Model):
    email=models.EmailField(max_length=54)
    gender=models.CharField(max_length=32)
    age=models.IntegerField(default=0)
    address=models.CharField(max_length=128)
    detailed_address =models.CharField(max_length=128)
    user=models.ForeignKey(User,on_delete=models.CASCADE)

    class Meta:
        db_table='users'

